#ifndef __CALC_INCLUDE
#define __CALC_INCLUDE

#include <iostream>

using namespace std;

#include "matrix.h"
#include "friends.h"

/**
    Class that organizes and orchestrates multiple matricies and 
        performs operations on them based upon user input.
*/
template <class T>
class Calc {
    
    public:
        /** Default constructor.  Initializes nothing.
            Parameters: None            
        */
        Calc();
        
        /** Default destructor.  Destroys matrixA & matrixB, if 
            assigned.
            Parameters: None
        */
        ~Calc();
        
        /** Executes the current operation against the current matricies.
            An operation and at least matrixA must already be set.
            Parameters: None
        */
        void execute();
        
        /** Assigns a matrix to the left hand side of a calculation.  
            Parameters:
                matrix - the matrix to assign to the left hand side.
        */
        void setMatrixA(Matrix<T>*);
        
        /** Assigns a matrix to the right hand side of a calculation.  
            Parameters:
                matrix - the matrix to assign to the right hand side.
        */        
        void setMatrixB(Matrix<T>*);
        
        /** Sets the operation to perform.  Operation is one of:
            1 - addition
            2 - subtraction
            3 - multiplication
            4 - increment each element
            5 - decrement each element
            6 - print matrix
            Parameter:
                operation - an integer from 1 to 6 as given above
        */
        void setOperation(int);
        
    private:
        /** the matrix on the left hand side of a calculation */
        Matrix<T>* matrixA;
        
        /** the matrix on the right hand side of a calculation */
        Matrix<T>* matrixB;
        
        /** the operation (as given by setOperation) to use */
        int operation;
};

#endif